﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gallio.Framework;
using MbUnit.Framework;
using MbUnit.Framework.ContractVerifiers;
using Quail;

namespace QuailTest.Pages
{
    public class HelloWorldPage : WebPage
    {
        public HelloWorldPage(WebBrowser browser)
            : base(browser)
        {
        }

        /// <summary>
        /// Gets the Result control
        /// </summary>
        public WebControl Result
        {
            get
            {
                return GetControl("div.result");
            }
        }

        /// <summary>
        /// Gets the All control
        /// </summary>
        public WebRadioGroup All
        {
            get
            {
                return GetRadioGroup("#all");
            }
        }

        /// <summary>
        /// Gets the Bemerry control
        /// </summary>
        public WebRadioGroup Bemerry
        {
            get
            {
                return GetRadioGroup("#bemerry");
            }
        }

        /// <summary>
        /// Gets the Drink control
        /// </summary>
        public WebRadioGroup Drink
        {
            get
            {
                return GetRadioGroup("#drink");
            }
        }

        /// <summary>
        /// Gets the Eat control
        /// </summary>
        public WebRadioGroup Eat
        {
            get
            {
                return GetRadioGroup("#eat");
            }
        }

        /// <summary>
        /// Gets the Sleep control
        /// </summary>
        public WebRadioGroup Sleep
        {
            get
            {
                return GetRadioGroup("#sleep");
            }
        }

        /// <summary>
        /// Gets the Submitform control
        /// </summary>
        public WebButton Submitform
        {
            get
            {
                return GetButton("#submitform");
            }
        }

        public override void NavigateToThisPage()
        {
            Browser.Navigate("/helloworld/demo1.aspx", this);
        }

        protected override bool IsThisPage()
        {
            return Location.EndsWith("/helloworld/demo1.aspx");
        }
    }
}
